﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Decoretor
{
    /// <summary>
    /// 装饰之后能够一种前进行记录
    /// </summary>
    public class DecoretorRobotRecord : IMoveable
    {
        public DecoretorRobotRecord(IRecordable recorder,IMoveable robot)
        {
            Recorder = recorder;
            Robot = robot;
        }

        private IMoveable Robot { get; set; }

        private IRecordable Recorder { get; set; }

        public void MoveJ(string pointstart, string pointend)
        {
            Recorder.Record($"******执行了一下开始记录");
            Robot.MoveJ(pointstart, pointend);
            Recorder.Record($"*******执行了一下结束记录");
        }
    }
}
